package com.voice.core.exception;

import com.voice.core.connection.entity.StreamData;

public class ClientException extends RuntimeException{
    private String errorCode;
    private String content;
    private static final String FORMAT = "%s, code: %s, request id: %s, content: %s";

    public ClientException(String message,  String code, String content) {
        super(String.format("%s, code: %s,  content: %s", message, code,content));
    }

    public ClientException(String message) {
        super(message);
    }

    public ClientException(String message, Throwable cause) {
        super(message, cause);
    }

    public ClientException(Throwable cause) {
        super(cause);
    }

    public ClientException(String message, StreamData streamData) {
        this(message, String.valueOf(streamData.getHeaders().code()), streamData.getHeaders().toString());
    }





}
